/**************************************************************
 *   File:	Window.h
 * Author:	Andrew Thorpe
 *  Brief:	A class to create a Win32 window and OpenGL
 *			rendering context
 **************************************************************/
#ifndef _FOSSIL_WINDOW_H
#define _FOSSIL_WINDOW_H

namespace Fossil
{
	class Window
	{
	public:

		static LRESULT CALLBACK WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
		static Window* Create(const char* title, int x, int y, int width, int height, int bits, bool fullscreen);
		void Destroy();

		inline HDC GetHDC() const { return m_hDc; }

	private:
		const char* m_Title;
		const char* m_ClassName;
		int			m_X;
		int			m_Y;
		int			m_Width;
		int			m_Height;
		int			m_Bits;
		bool		m_Fullscreen;
		HDC			m_hDc;
		HGLRC		m_hRc;
		HWND		m_hWnd;
		HINSTANCE	m_hInstance;

		Window(void)
			: m_Title("")
			, m_ClassName("")
			, m_X(0) 
			, m_Y(0)
			, m_Width(0)
			, m_Height(0) 
			, m_Bits(0)
			, m_Fullscreen(false)
			, m_hDc(NULL)
			, m_hRc(NULL)
			, m_hWnd(NULL)
			, m_hInstance(NULL)
			{}
		~Window(void) { Destroy(); }
	};
};

#endif//_FOSSIL_WINDOW_H
